#include "EditLexer.h"
#include "EditStyleX.h"

// https://en.wikipedia.org/wiki/Common_Lisp
// https://common-lisp.net/

static KEYWORDLIST Keywords_LISP = {{
"nil car cdr list "
"cond defun defvar defmacro let setq setf and or not equal if while lambda loop when "
,
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,

nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
}};

static EDITSTYLE Styles_LISP[] = {
	EDITSTYLE_DEFAULT,
	{ SCE_LISP_KEYWORD, NP2StyleX_Keyword, L"fore:#FF8000" },
	{ MULTI_STYLE(SCE_LISP_COMMENTLINE, SCE_LISP_COMMENTBLOCK, 0, 0), NP2StyleX_Comment, L"fore:#008000" },
	{ MULTI_STYLE(SCE_LISP_STRING, SCE_LISP_CHARACTER, 0, 0), NP2StyleX_String, L"fore:#008000" },
	{ SCE_LISP_NUMBER, NP2StyleX_Number, L"fore:#FF0000" },
	{ SCE_LISP_OPERATOR, NP2StyleX_Operator, L"fore:#B000B0" },
};

EDITLEXER lexLisp = {
	SCLEX_LISP, NP2LEX_LISP,
//Settings++Autogenerated -- start of section automatically generated
		LexerAttr_Default,
		TAB_WIDTH_4, INDENT_WIDTH_4,
		(1 << 0) | (1 << 1), // level1, level2
		0,
		'\\', 0, 0,
		0,
		0, SCE_LISP_OPERATOR,
		SCE_LISP_OPERATOR, 0,
		KeywordAttr_Default
		, SCE_LISP_TASKMARKER,
		SCE_LISP_CHARACTER, SCE_LISP_STRING,
//Settings--Autogenerated -- end of section automatically generated
	EDITLEXER_HOLE(L"Lisp Script", Styles_LISP),
	L"lisp; el; lsp; clj; cljs; scm",
	&Keywords_LISP,
	Styles_LISP
};
